import Vue from 'vue'
// * 结算汇总api

// * 结算单列表
export function fetchSummaryList(opts) {
  return Vue.axios.post('/settle/list.do', opts);
}
// * 结算单明细列表
export function fetchDetailList(opts) {
  return Vue.axios.post('/settle/detailList.do', opts);
}
// * 一键结算的列表
export function fetchOneClickSettlementList(opts) {
  return Vue.axios.post('/settle/submitList.do', opts);
}
// * 详情明细
export function fetchDetail(opts) {
  return Vue.axios.post('/settle/detail.do', opts);
}
// * 费用计算
export function fetchFeeCalculation(opts) {
  return Vue.axios.post('/settle/detail/calculate.do', opts);
}
// * 保存明细信息
export function fetchSaveDetail(opts) {
  return Vue.axios.post('/settle/detail/save.do', opts);
}
// * 一键结算
export function fetchSubmitSettlement(opts) {
  return Vue.axios.post('/settle/submit.do', opts);
}
// * 发票列表
export function fetchFileList(opts){
  return Vue.axios.post('/settle/invoice/list.do', opts)
}
// * 上传发票
export function fetchUploadFile(opts){
  return Vue.axios.post('/settle/invoice/upload.do', opts)
}
// * 删除发票
export function fetchDelInvoice(opts){
  return Vue.axios.post('/settle/invoice/delete.do', opts)
}
// * 提交发票
export function fetchSubmitInvoices(opts){
  return Vue.axios.post('/settle/confirm.do', opts)
}
// * 下载结算单pdf
export function fetchDownSettlementPDF(opts){
  return Vue.axios.post('/settle/download/summary.do', opts, {responseType: 'blob'})
}
// * 下载结算单明细excel
export function fetchDownSettlementExcel(opts){
  return Vue.axios.post('/settle/download/detail.do', opts)
}
// * 结算单下载 opts：多个月份
export function fetchDownMonthSettlementOrder(opts){
  return Vue.axios.post('/settle/download/month/summary.do', opts, {responseType: 'blob'})
}
// 上传发票
export function fetchUploadInvoices(opts){
  return Vue.axios.post('/settle/invoice/upload.do', opts)
}
// 驳回原因
export function fetchSettleInvoiceList(opts){
  return Vue.axios.post('/settle/invoice/list.do', opts)
}
